package com.orkhonsoft.tengrinshar.chat;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

import com.orkhonsoft.tengrinshar.chat.config.MyWebSocket;

import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableDiscoveryClient
@EnableSwagger2
//@EnableCircuitBreaker
@MapperScan("com.orkhonsoft.tengrinshar.chat.mapper")//写自己的mapper路径即可
@EnableFeignClients
public class ExportServiceApplication  {
	
	public static void main(String[] args) {
//		SpringApplication.run(ExportServiceApplication.class, args);
		
		
		
		SpringApplication springApplication = new SpringApplication(ExportServiceApplication.class);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
        //解决WebSocket不能注入的问题
        MyWebSocket.setApplicationContext(configurableApplicationContext);
		
	}
	
}
